//
//  SettingTableViewCell.m
//  JiuJiuShangCheng
//
//  Created by jiujiukeji on 2018/7/6.
//  Copyright © 2018年 jiujiukeji. All rights reserved.
//

#import "SettingTableViewCell.h"

@implementation SettingTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setUpUI];
    }
    return self;
}
- (void)setUpUI
{
    self.leftLB = [UILabel labelWithText:@"" textColor:UIColorFromRGB(0x323232) fontSize:15];
    [_leftLB sizeToFit];
    [self addSubview:_leftLB];
    [_leftLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(rateWidth(30));
        make.centerY.equalTo(self);
    }];
    
    self.arrow = [[UIImageView alloc] init];
    _arrow.image = UIImageNamed(@"rightArrow");
    [_arrow sizeToFit];
    [self addSubview:_arrow];
    [_arrow mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.right.equalTo(self).offset(-rateWidth(30));
    }];
    
    self.line = [[UIView alloc] init];
    _line.backgroundColor = globalGray;
    [self addSubview:_line];
    [_line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(rateWidth(30));
        make.bottom.right.equalTo(self);
        make.height.equalTo(@(rateHeight(2)));
    }];
}

@end
